﻿
namespace bookMaster.AssetSystem.Windows.Forms
{
	/// <summary>
	/// abstract DetallePedidos typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class DetallePedidosDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<DetallePedidosDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.DetallePedidos _currentDetallePedidos = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxDetallePedidosDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxDetallePedidosErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxDetallePedidosBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the IdDetallePedidos property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIdDetallePedidosDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IdPedido property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIdPedidoDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IdCatalogo property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIdCatalogoDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the CantidadSolicitadaDetallePedidos property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxCantidadSolicitadaDetallePedidosDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the CantidadEntregadaDetallePedidos property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxCantidadEntregadaDetallePedidosDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the CantidadPendienteDetallePedidos property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxCantidadPendienteDetallePedidosDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.Catalogo> _IdCatalogoList;
		
		/// <summary> 
		/// The list of selectable Catalogo
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Catalogo> IdCatalogoList
		{
			get {return this._IdCatalogoList;}
			set 
			{
				this._IdCatalogoList = value;
				this.uxIdCatalogoDataGridViewColumn.DataSource = null;
				this.uxIdCatalogoDataGridViewColumn.DataSource = this._IdCatalogoList;
			}
		}
		
		private bool _allowNewItemInIdCatalogoList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Catalogo
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIdCatalogoList
		{
			get { return _allowNewItemInIdCatalogoList;}
			set
			{
				this._allowNewItemInIdCatalogoList = value;
				this.uxIdCatalogoDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.Pedidos> _IdPedidoList;
		
		/// <summary> 
		/// The list of selectable Pedidos
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Pedidos> IdPedidoList
		{
			get {return this._IdPedidoList;}
			set 
			{
				this._IdPedidoList = value;
				this.uxIdPedidoDataGridViewColumn.DataSource = null;
				this.uxIdPedidoDataGridViewColumn.DataSource = this._IdPedidoList;
			}
		}
		
		private bool _allowNewItemInIdPedidoList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Pedidos
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIdPedidoList
		{
			get { return _allowNewItemInIdPedidoList;}
			set
			{
				this._allowNewItemInIdPedidoList = value;
				this.uxIdPedidoDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.DetallePedidos> _DetallePedidosList;
				
		/// <summary> 
		/// The list of DetallePedidos to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.DetallePedidos> DetallePedidosList
		{
			get {return this._DetallePedidosList;}
			set
			{
				this._DetallePedidosList = value;
				this.uxDetallePedidosBindingSource.DataSource = null;
				this.uxDetallePedidosBindingSource.DataSource = value;
				this.uxDetallePedidosDataGridView.DataSource = null;
				this.uxDetallePedidosDataGridView.DataSource = this.uxDetallePedidosBindingSource;				
				//this.uxDetallePedidosBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxDetallePedidosBindingSource_ListChanged);
				this.uxDetallePedidosBindingSource.CurrentItemChanged += new System.EventHandler(OnDetallePedidosBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnDetallePedidosBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentDetallePedidos = uxDetallePedidosBindingSource.Current as Entities.DetallePedidos;
			
			if (_currentDetallePedidos != null)
			{
				_currentDetallePedidos.Validate();
			}
			//_DetallePedidos.Validate();
			OnCurrentEntityChanged();
		}

		//void uxDetallePedidosBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.DetallePedidos"/> instance.
		/// </summary>
		public Entities.DetallePedidos SelectedDetallePedidos
		{
			get {return this._currentDetallePedidos;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxDetallePedidosDataGridView.VirtualMode;}
			set
			{
				this.uxDetallePedidosDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxDetallePedidosDataGridView.AllowUserToAddRows;}
			set {this.uxDetallePedidosDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxDetallePedidosDataGridView.AllowUserToDeleteRows;}
			set {this.uxDetallePedidosDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxDetallePedidosDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxDetallePedidosDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="DetallePedidosDataGridViewBase"/> class.
		/// </summary>
		public DetallePedidosDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxDetallePedidosDataGridView = new System.Windows.Forms.DataGridView();
			this.uxDetallePedidosBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxDetallePedidosErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIdDetallePedidosDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIdPedidoDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxIdCatalogoDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxCantidadSolicitadaDetallePedidosDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxCantidadEntregadaDetallePedidosDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxCantidadPendienteDetallePedidosDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			//this.uxIdCatalogoBindingSource = new CatalogoBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIdCatalogoBindingSource)).BeginInit();
			//this.uxIdPedidoBindingSource = new PedidosBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIdPedidoBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDetallePedidosDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDetallePedidosBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDetallePedidosErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxDetallePedidosErrorProvider
			// 
			this.uxDetallePedidosErrorProvider.ContainerControl = this;
			this.uxDetallePedidosErrorProvider.DataSource = this.uxDetallePedidosBindingSource;						
			// 
			// uxDetallePedidosDataGridView
			// 
			this.uxDetallePedidosDataGridView.AutoGenerateColumns = false;
			this.uxDetallePedidosDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxDetallePedidosDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIdDetallePedidosDataGridViewColumn,
		this.uxIdPedidoDataGridViewColumn,
		this.uxIdCatalogoDataGridViewColumn,
		this.uxCantidadSolicitadaDetallePedidosDataGridViewColumn,
		this.uxCantidadEntregadaDetallePedidosDataGridViewColumn,
		this.uxCantidadPendienteDetallePedidosDataGridViewColumn			});
			this.uxDetallePedidosDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxDetallePedidosDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxDetallePedidosDataGridView.Name = "uxDetallePedidosDataGridView";
			this.uxDetallePedidosDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxDetallePedidosDataGridView.TabIndex = 0;	
			this.uxDetallePedidosDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxDetallePedidosDataGridView.EnableHeadersVisualStyles = false;
			this.uxDetallePedidosDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnDetallePedidosDataGridViewDataError);
			this.uxDetallePedidosDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnDetallePedidosDataGridViewCellValueNeeded);
			this.uxDetallePedidosDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnDetallePedidosDataGridViewCellValuePushed);
			
			//
			// uxIdDetallePedidosDataGridViewColumn
			//
			this.uxIdDetallePedidosDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIdDetallePedidosDataGridViewColumn.DataPropertyName = "IdDetallePedidos";
			this.uxIdDetallePedidosDataGridViewColumn.HeaderText = "IdDetallePedidos";
			this.uxIdDetallePedidosDataGridViewColumn.Name = "uxIdDetallePedidosDataGridViewColumn";
			this.uxIdDetallePedidosDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIdDetallePedidosDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIdDetallePedidosDataGridViewColumn.ReadOnly = true;		
			//
			// uxIdPedidoDataGridViewColumn
			//
			this.uxIdPedidoDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIdPedidoDataGridViewColumn.DataPropertyName = "IdPedido";
			this.uxIdPedidoDataGridViewColumn.HeaderText = "IdPedido";
			this.uxIdPedidoDataGridViewColumn.Name = "uxIdPedidoDataGridViewColumn";
			this.uxIdPedidoDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIdPedidoDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIdPedidoDataGridViewColumn.ReadOnly = false;		
			//
			// uxIdCatalogoDataGridViewColumn
			//
			this.uxIdCatalogoDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIdCatalogoDataGridViewColumn.DataPropertyName = "IdCatalogo";
			this.uxIdCatalogoDataGridViewColumn.HeaderText = "IdCatalogo";
			this.uxIdCatalogoDataGridViewColumn.Name = "uxIdCatalogoDataGridViewColumn";
			this.uxIdCatalogoDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIdCatalogoDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIdCatalogoDataGridViewColumn.ReadOnly = false;		
			//
			// uxCantidadSolicitadaDetallePedidosDataGridViewColumn
			//
			this.uxCantidadSolicitadaDetallePedidosDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxCantidadSolicitadaDetallePedidosDataGridViewColumn.DataPropertyName = "CantidadSolicitadaDetallePedidos";
			this.uxCantidadSolicitadaDetallePedidosDataGridViewColumn.HeaderText = "CantidadSolicitadaDetallePedidos";
			this.uxCantidadSolicitadaDetallePedidosDataGridViewColumn.Name = "uxCantidadSolicitadaDetallePedidosDataGridViewColumn";
			this.uxCantidadSolicitadaDetallePedidosDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxCantidadSolicitadaDetallePedidosDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxCantidadSolicitadaDetallePedidosDataGridViewColumn.ReadOnly = false;		
			//
			// uxCantidadEntregadaDetallePedidosDataGridViewColumn
			//
			this.uxCantidadEntregadaDetallePedidosDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxCantidadEntregadaDetallePedidosDataGridViewColumn.DataPropertyName = "CantidadEntregadaDetallePedidos";
			this.uxCantidadEntregadaDetallePedidosDataGridViewColumn.HeaderText = "CantidadEntregadaDetallePedidos";
			this.uxCantidadEntregadaDetallePedidosDataGridViewColumn.Name = "uxCantidadEntregadaDetallePedidosDataGridViewColumn";
			this.uxCantidadEntregadaDetallePedidosDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxCantidadEntregadaDetallePedidosDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxCantidadEntregadaDetallePedidosDataGridViewColumn.ReadOnly = false;		
			//
			// uxCantidadPendienteDetallePedidosDataGridViewColumn
			//
			this.uxCantidadPendienteDetallePedidosDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxCantidadPendienteDetallePedidosDataGridViewColumn.DataPropertyName = "CantidadPendienteDetallePedidos";
			this.uxCantidadPendienteDetallePedidosDataGridViewColumn.HeaderText = "CantidadPendienteDetallePedidos";
			this.uxCantidadPendienteDetallePedidosDataGridViewColumn.Name = "uxCantidadPendienteDetallePedidosDataGridViewColumn";
			this.uxCantidadPendienteDetallePedidosDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxCantidadPendienteDetallePedidosDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxCantidadPendienteDetallePedidosDataGridViewColumn.ReadOnly = false;		
			//
			// uxIdCatalogoDataGridViewColumn
			//				
			this.uxIdCatalogoDataGridViewColumn.DisplayMember = "Isbn";	
			this.uxIdCatalogoDataGridViewColumn.ValueMember = "IdCatalogo";	
			this.uxIdCatalogoDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIdCatalogoDataGridViewColumn.DataSource = uxIdCatalogoBindingSource;				
				
			//
			// uxIdPedidoDataGridViewColumn
			//				
			this.uxIdPedidoDataGridViewColumn.DisplayMember = "IdCliente";	
			this.uxIdPedidoDataGridViewColumn.ValueMember = "IdPedido";	
			this.uxIdPedidoDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIdPedidoDataGridViewColumn.DataSource = uxIdPedidoBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxDetallePedidosDataGridView);
			this.Name = "DetallePedidosDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIdCatalogoBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIdPedidoBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDetallePedidosErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDetallePedidosDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDetallePedidosBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				DetallePedidosDataGridViewEventArgs args = new DetallePedidosDataGridViewEventArgs();
				args.DetallePedidos = _currentDetallePedidos;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class DetallePedidosDataGridViewEventArgs : System.EventArgs
		{
			private Entities.DetallePedidos	_DetallePedidos;
	
			/// <summary>
			/// the  Entities.DetallePedidos instance.
			/// </summary>
			public Entities.DetallePedidos DetallePedidos
			{
				get { return _DetallePedidos; }
				set { _DetallePedidos = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxDetallePedidosDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnDetallePedidosDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxDetallePedidosDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnDetallePedidosDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxDetallePedidosDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIdDetallePedidosDataGridViewColumn":
						e.Value = DetallePedidosList[e.RowIndex].IdDetallePedidos;
						break;
					case "uxIdPedidoDataGridViewColumn":
						e.Value = DetallePedidosList[e.RowIndex].IdPedido;
						break;
					case "uxIdCatalogoDataGridViewColumn":
						e.Value = DetallePedidosList[e.RowIndex].IdCatalogo;
						break;
					case "uxCantidadSolicitadaDetallePedidosDataGridViewColumn":
						e.Value = DetallePedidosList[e.RowIndex].CantidadSolicitadaDetallePedidos;
						break;
					case "uxCantidadEntregadaDetallePedidosDataGridViewColumn":
						e.Value = DetallePedidosList[e.RowIndex].CantidadEntregadaDetallePedidos;
						break;
					case "uxCantidadPendienteDetallePedidosDataGridViewColumn":
						e.Value = DetallePedidosList[e.RowIndex].CantidadPendienteDetallePedidos;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxDetallePedidosDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnDetallePedidosDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxDetallePedidosDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIdDetallePedidosDataGridViewColumn":
						DetallePedidosList[e.RowIndex].IdDetallePedidos = (System.Int32)e.Value;
						break;
					case "uxIdPedidoDataGridViewColumn":
						DetallePedidosList[e.RowIndex].IdPedido = (System.Int32?)e.Value;
						break;
					case "uxIdCatalogoDataGridViewColumn":
						DetallePedidosList[e.RowIndex].IdCatalogo = (System.Int32)e.Value;
						break;
					case "uxCantidadSolicitadaDetallePedidosDataGridViewColumn":
						DetallePedidosList[e.RowIndex].CantidadSolicitadaDetallePedidos = (System.Int32?)e.Value;
						break;
					case "uxCantidadEntregadaDetallePedidosDataGridViewColumn":
						DetallePedidosList[e.RowIndex].CantidadEntregadaDetallePedidos = (System.Int32?)e.Value;
						break;
					case "uxCantidadPendienteDetallePedidosDataGridViewColumn":
						DetallePedidosList[e.RowIndex].CantidadPendienteDetallePedidos = (System.Int32?)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
